<template>
  <view @click="handleImgClick">
    <slot></slot>
  </view>
</template>

<script>
export default {
  props: {
    list: Array,
    index: Number
  },
  mounted(){
    console.log(this.list)
    console.log(this.index)
  },
  methods: {
    handleImgClick() {
      console.log(1)
      getApp().globalData.imgList = this.list;
      getApp().globalData.imgIndex = this.index;

      console.log(getApp().globalData)
      uni.navigateTo({
        url: '/pages/imgDetail/index'
      })
    }
  }
}
</script>

<style>

</style>